﻿using System;
using System.Windows;
using System.Windows.Media;

namespace LpbPrj.Client.Controls;

/// <summary>
/// SilderUnlockAttach
/// </summary>
public class SilderUnlockAttach
{
    /// <summary>
    /// 滑块图
    /// </summary>
    public static readonly DependencyProperty SilderImageSourceProperty = DependencyProperty.RegisterAttached(
        "SilderImageSource", typeof(ImageSource), typeof(SilderUnlockAttach), new FrameworkPropertyMetadata(default(ImageSource), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetSilderImageSource(DependencyObject element, ImageSource value) => element.SetValue(SilderImageSourceProperty, value);
    public static ImageSource GetSilderImageSource(DependencyObject element) => (ImageSource)element.GetValue(SilderImageSourceProperty);

    /// <summary>
    /// 文本图
    /// </summary>
    public static readonly DependencyProperty TextImageSourceProperty = DependencyProperty.RegisterAttached(
        "TextImageSource", typeof(ImageSource), typeof(SilderUnlockAttach), new FrameworkPropertyMetadata(default(ImageSource), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetTextImageSource(DependencyObject element, ImageSource value) => element.SetValue(TextImageSourceProperty, value);
    public static ImageSource GetTextImageSource(DependencyObject element) => (ImageSource)element.GetValue(TextImageSourceProperty);

    /// <summary>
    /// 未解锁背景色
    /// </summary>
    public static readonly DependencyProperty LockedBrushProperty = DependencyProperty.RegisterAttached(
        "LockedBrush", typeof(Brush), typeof(SilderUnlockAttach), new FrameworkPropertyMetadata(Brushes.Red, FrameworkPropertyMetadataOptions.Inherits));
    public static void SetLockedBrush(DependencyObject element, Brush value) => element.SetValue(LockedBrushProperty, value);
    public static Brush GetLockedBrush(DependencyObject element) => (Brush)element.GetValue(LockedBrushProperty);
    /// <summary>
    /// 未解锁背景色圆角
    /// </summary>
    public static readonly DependencyProperty LockedBrushCornerRadiusProperty = DependencyProperty.RegisterAttached(
        "LockedBrushCornerRadius", typeof(CornerRadius), typeof(SilderUnlockAttach), new FrameworkPropertyMetadata(new CornerRadius(0,5,5,0), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetLockedBrushCornerRadius(DependencyObject element, CornerRadius value) => element.SetValue(LockedBrushCornerRadiusProperty, value);
    public static CornerRadius GetLockedBrushCornerRadius(DependencyObject element) => (CornerRadius)element.GetValue(LockedBrushCornerRadiusProperty);
    /// <summary>
    /// 未解锁背景色边距
    /// </summary>
    public static readonly DependencyProperty LockedBrushMarginProperty = DependencyProperty.RegisterAttached(
        "LockedBrushMargin", typeof(Thickness), typeof(SilderUnlockAttach), new FrameworkPropertyMetadata(new Thickness(0, 0, 5, 0), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetLockedBrushMargin(DependencyObject element, Thickness value) => element.SetValue(LockedBrushMarginProperty, value);
    public static Thickness GetLockedBrushMargin(DependencyObject element) => (Thickness)element.GetValue(LockedBrushMarginProperty);

    /// <summary>
    /// 已解锁背景色
    /// </summary>
    public static readonly DependencyProperty UnlockBrushProperty = DependencyProperty.RegisterAttached(
        "UnlockBrush", typeof(Brush), typeof(SilderUnlockAttach), new FrameworkPropertyMetadata(Brushes.Green, FrameworkPropertyMetadataOptions.Inherits));
    public static void SetUnlockBrush(DependencyObject element, Brush value) => element.SetValue(UnlockBrushProperty, value);
    public static Brush GetUnlockBrush(DependencyObject element) => (Brush)element.GetValue(UnlockBrushProperty);
    /// <summary>
    /// 已解锁背景色圆角
    /// </summary>
    public static readonly DependencyProperty UnlockBrushCornerRadiusProperty = DependencyProperty.RegisterAttached(
        "UnlockBrushCornerRadius", typeof(CornerRadius), typeof(SilderUnlockAttach), new FrameworkPropertyMetadata(new CornerRadius(5, 0, 0, 5), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetUnlockBrushCornerRadius(DependencyObject element, CornerRadius value) => element.SetValue(UnlockBrushCornerRadiusProperty, value);
    public static CornerRadius GetUnlockBrushCornerRadius(DependencyObject element) => (CornerRadius)element.GetValue(UnlockBrushCornerRadiusProperty);
    /// <summary>
    /// 已解锁背景色边距
    /// </summary>
    public static readonly DependencyProperty UnlockBrushMarginProperty = DependencyProperty.RegisterAttached(
        "UnlockBrushMargin", typeof(Thickness), typeof(SilderUnlockAttach), new FrameworkPropertyMetadata(new Thickness(5, 0, 0, 0), FrameworkPropertyMetadataOptions.Inherits));
    public static void SetUnlockBrushMargin(DependencyObject element, Thickness value) => element.SetValue(UnlockBrushMarginProperty, value);
    public static Thickness GetUnlockBrushMargin(DependencyObject element) => (Thickness)element.GetValue(UnlockBrushMarginProperty);

    /// <summary>
    /// 背景色高
    /// </summary>
    public static readonly DependencyProperty SilderBrushHeightProperty = DependencyProperty.RegisterAttached(
        "SilderBrushHeight", typeof(double), typeof(SilderUnlockAttach), new FrameworkPropertyMetadata(10.0, FrameworkPropertyMetadataOptions.Inherits));
    public static void SetSilderBrushHeight(DependencyObject element, double value) => element.SetValue(SilderBrushHeightProperty, value);
    public static double GetSilderBrushHeight(DependencyObject element) => (double)element.GetValue(SilderBrushHeightProperty);



}